import {
  HashRouter as Router,
  Switch,
  Route,
} from "react-router-dom";
import Home from "view/Home";
import Statistics from "view/Statistics";
import Todolist from "view/Todolist";


function App() {
  return (
    <Router>   
          <Switch >
            <Route path="/todolist">
              <Todolist />
            </Route>
            <Route path="/tomato">
              <Tomato />
            </Route>
            <Route path="/statistics">
              <Statistics />
            </Route>
            <Route path="/login">
              <Login />
            </Route>
            <Route path="/">
              <Home />
            </Route>
            <Route path="*">
              <NoMatch />
            </Route>
          </Switch>
    </Router>
  );
}


function Tomato(){
  return <h2>番茄时钟</h2>
}
function Login() {
  return <h2>登录页</h2>;
}
function NoMatch() {
  return <h2>404</h2>;
}

export default App;
